<template>
    <el-table :data="props.tableData" style="width: 100%" @selection-change="selectchange">
        <el-table-column type="selection" width="55" />
        <el-table-column prop="fileName" label="文件名">
            <template #default="scope">

                <div style="display: flex;justify-content: space-between;">
                    <div>{{ scope.row.fileName }}</div>
                    <div class="cz">
                        <div style="display: flex;align-items: center;cursor:pointer">
                            <div @click="recover(scope.row)"
                                style="display: flex;align-items: center;cursor:pointer;margin-right: 20px;color:#409eff">
                                <el-icon>
                                    <Link />
                                </el-icon>
                                还原
                            </div>
                            <div @click="resetshare(scope.row)"
                                style="display: flex;align-items: center;cursor:pointer;margin-right: 20px;color:#409eff">
                                <el-icon>
                                    <Eleme />
                                </el-icon>
                                删除
                            </div>

                        </div>
                    </div>
                </div>
            </template>

        </el-table-column>

        <el-table-column prop="shareTime" label="分享时间" width="200" />
        <el-table-column prop="expireTime" label="失效时间" width="200" />
        <el-table-column prop="showCount" label="浏览次数" width="200" />


    </el-table>


</template>
<script setup>
import { ref } from 'vue';
const props = defineProps(["tableData"])
const emit = defineEmits(["selectlist", "reset", "recover"])
const tableData = ref([])
const selectchange = (e) => {
    emit("selectlist", e)

}
const resetshare = (row) => {
    emit("reset", row)
}
const recover = (row) => {
    emit("recover", row)
}
</script>